Optimal. Leaf size=413 \[ \frac {2 a (b B-a C) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^{3/2}}-\frac {2 \left (-2 a^2 C+a b B+b^2 C\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 b^3 d \left (a^2-b^2\right )}-\frac {2 a^2 \left (-6 a^3 C+3 a^2 b B+10 a b^2 C-7 b^3 B\right ) \sin (c+d x)}{3 b^3 d \left (a^2-b^2\right )^2 \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-16 a^4 C+8 a^3 b B+16 a^2 b^2 C-9 a b^3 B+b^4 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^4 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (-16 a^5 C+8 a^4 b B+28 a^3 b^2 C-15 a^2 b^3 B-8 a b^4 C+3 b^5 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^4 d \left (a^2-b^2\right )^2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.95, antiderivative size = 413, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3029, 2989, 3031, 3023, 2752, 2663, 2661, 2655, 2653} \[ \frac {2 a (b B-a C) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^{3/2}}-\frac {2 a^2 \left (3 a^2 b B-6 a^3 C+10 a b^2 C-7 b^3 B\right ) \sin (c+d x)}{3 b^3 d \left (a^2-b^2\right )^2 \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-2 a^2 C+a b B+b^2 C\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 b^3 d \left (a^2-b^2\right )}-\frac {2 \left (16 a^2 b^2 C+8 a^3 b B-16 a^4 C-9 a b^3 B+b^4 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^4 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (-15 a^2 b^3 B+28 a^3 b^2 C+8 a^4 b B-16 a^5 C-8 a b^4 C+3 b^5 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^4 d \left (a^2-b^2\right )^2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2989
Rule 3023
Rule 3029
Rule 3031
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{5/2}} \, dx &=\int \frac {\cos ^3(c+d x) (B+C \cos (c+d x))}{(a+b \cos (c+d x))^{5/2}} \, dx\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}-\frac {2 \int \frac {\cos (c+d x) \left (-2 a (b B-a C)+\frac {3}{2} b (b B-a C) \cos (c+d x)+\frac {3}{2} \left (a b B-2 a^2 C+b^2 C\right ) \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx}{3 b \left (a^2-b^2\right )}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}-\frac {2 a^2 \left (3 a^2 b B-7 b^3 B-6 a^3 C+10 a b^2 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}-\frac {4 \int \frac {-\frac {1}{4} a b \left (3 a^2 b B-7 b^3 B-6 a^3 C+10 a b^2 C\right )-\frac {1}{4} \left (6 a^4 b B-13 a^2 b^3 B+3 b^5 B-12 a^5 C+22 a^3 b^2 C-6 a b^4 C\right ) \cos (c+d x)+\frac {3}{4} b \left (a^2-b^2\right ) \left (a b B-2 a^2 C+b^2 C\right ) \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b^3 \left (a^2-b^2\right )^2}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}-\frac {2 a^2 \left (3 a^2 b B-7 b^3 B-6 a^3 C+10 a b^2 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (a b B-2 a^2 C+b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d}-\frac {8 \int \frac {-\frac {3}{8} b^2 \left (2 a^3 b B-6 a b^3 B-4 a^4 C+7 a^2 b^2 C+b^4 C\right )-\frac {3}{8} b \left (8 a^4 b B-15 a^2 b^3 B+3 b^5 B-16 a^5 C+28 a^3 b^2 C-8 a b^4 C\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{9 b^4 \left (a^2-b^2\right )^2}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}-\frac {2 a^2 \left (3 a^2 b B-7 b^3 B-6 a^3 C+10 a b^2 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (a b B-2 a^2 C+b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d}-\frac {\left (8 a^3 b B-9 a b^3 B-16 a^4 C+16 a^2 b^2 C+b^4 C\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b^4 \left (a^2-b^2\right )}+\frac {\left (8 a^4 b B-15 a^2 b^3 B+3 b^5 B-16 a^5 C+28 a^3 b^2 C-8 a b^4 C\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{3 b^4 \left (a^2-b^2\right )^2}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}-\frac {2 a^2 \left (3 a^2 b B-7 b^3 B-6 a^3 C+10 a b^2 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (a b B-2 a^2 C+b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d}+\frac {\left (\left (8 a^4 b B-15 a^2 b^3 B+3 b^5 B-16 a^5 C+28 a^3 b^2 C-8 a b^4 C\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{3 b^4 \left (a^2-b^2\right )^2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (\left (8 a^3 b B-9 a b^3 B-16 a^4 C+16 a^2 b^2 C+b^4 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{3 b^4 \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 \left (8 a^4 b B-15 a^2 b^3 B+3 b^5 B-16 a^5 C+28 a^3 b^2 C-8 a b^4 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^4 \left (a^2-b^2\right )^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (8 a^3 b B-9 a b^3 B-16 a^4 C+16 a^2 b^2 C+b^4 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^4 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}-\frac {2 a^2 \left (3 a^2 b B-7 b^3 B-6 a^3 C+10 a b^2 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (a b B-2 a^2 C+b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.99, size = 334, normalized size = 0.81 \[ \frac {2 \left (\frac {\left (\frac {a+b \cos (c+d x)}{a+b}\right )^{3/2} \left (b^2 \left (-4 a^4 C+2 a^3 b B+7 a^2 b^2 C-6 a b^3 B+b^4 C\right ) F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-\left (16 a^5 C-8 a^4 b B-28 a^3 b^2 C+15 a^2 b^3 B+8 a b^4 C-3 b^5 B\right ) \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )\right )}{(a-b)^2 (a+b)}+\frac {b \sin (c+d x) \left (16 a^6 C-8 a^5 b B-25 a^4 b^2 C+16 a^3 b^3 B+C \left (b^3-a^2 b\right )^2 \cos (2 (c+d x))+2 a b \left (10 a^4 C-5 a^3 b B-16 a^2 b^2 C+9 a b^3 B+2 b^4 C\right ) \cos (c+d x)+b^6 C\right )}{2 \left (a^2-b^2\right )^2}\right )}{3 b^4 d (a+b \cos (c+d x))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.17, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (C \cos \left (d x + c\right )^{4} + B \cos \left (d x + c\right )^{3}\right )} \sqrt {b \cos \left (d x + c\right ) + a}}{b^{3} \cos \left (d x + c\right )^{3} + 3 \, a b^{2} \cos \left (d x + c\right )^{2} + 3 \, a^{2} b \cos \left (d x + c\right ) + a^{3}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 12.34, size = 1389, normalized size = 3.36 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^2\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{5/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________